import requests

# resp = requests.get(url="http://www.baidu.com/")
url2 = 'https://srarch.jd.com/Search?'

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"}
datas = [{'keyword': '华为'}]
d1 = 0
for i in datas:
    ff = open('%s.html' % d1, 'w', encoding='utf-8')
    ff.write(requests.get(url=url2, headers=headers, params=i).content.decode('utf-8'))
    d1 += 1
